// Test new graph class
#include "Graph.h"
#include <iostream>
#include <string>
#include "Serializable_Int.h"

int main() {
    try {
        Graph<Serializable_Int,double,std::string> g(4, 6, 0, false);

        Serializable_Int one(11);
        Serializable_Int two(22);
        Serializable_Int three(33);
        Serializable_Int four(44);

        g.add_vertex("one",one);
        g.add_vertex("two",two);
        g.add_vertex("three",three);
        g.add_vertex("four",four);

        g.add_edge("one", "two", 12.0f);
        g.add_edge("two", "one", 21.0f);
        g.add_edge("one", "three", 13.0f);
        g.add_edge("three", "two", 32.0f);
        g.add_edge("two", "four", 24.0f);
        g.add_edge("four", "three", 43.0f);

        g.print(std::cout);

        Graph<Serializable_Int,double,std::string> g2(0, 0, 0, true);
        Parser_Special p("simple_graph.txt");
        g2.read(p);
        g2.print(std::cout);
    }
    catch (std::string s) {
        std::cout << "Error: " << s << "\n";
    }
}
